//
//  UIBarButtonItem+Extension.swift
//  SinaWeibo
//
//  Created by 张子国 on 15/11/22.
//  Copyright © 2015年 张子国. All rights reserved.
//

import UIKit

extension UIBarButtonItem {
    convenience init(imageName : String) {
        let btn = UIButton(type: UIButtonType.Custom)
        btn.setImage(UIImage(named: imageName), forState: .Normal)
        btn.setImage(UIImage(named: imageName + "_highlighted"), forState: .Highlighted)
       
        btn.sizeToFit()
       
        self.init(customView:btn)

    }
}